#include "PickUp.h"

PickUp::PickUp(void)
{
	this->InitSprite(1);
	this->Init( Vector3D( 0, 0, 0 ), 30, 30 );
	itemNumber = Item::no::NOTHING;
}

PickUp::~PickUp(void)
{
}

void PickUp::InitPickUp( Vector3D position, Item::no ItemNumber )
{
	this->itemNumber = ItemNumber;

	//Base on item type, give different item image

	switch(itemNumber)
	{
		case Item::no::ARROWHEAD:
			this->SetSprite(0, "images/Item_BrokenBow.tga");
			break;
		case Item::no::SWORDPIECE:
			this->SetSprite(0, "images/Item_BrokenSword.tga");
			break;
		case Item::no::LEATHER:
			this->SetSprite(0, "images/Item_Bag.tga");
			break;
		case Item::no::APPLE:
			this->SetSprite(0, "images/Apple.tga");
	}

	/*if( type == HAMMER )
	{
		this->SetSprite(0, "images/Pickup/PU_Hammer.tga");
	}
	else if( type == BAG )
	{
		this->SetSprite(0, "images/Pickup/PU_Bag.tga");
	}*/

	this->SetPosition( position );
}

Item::no PickUp::GetItemNumber(void)
{
	return itemNumber;
}

Item::type PickUp::GetItemType(void)
{
	Item tempItem;
	return tempItem.ReturnItemType(itemNumber); 
}